<#macro plan_css datepicker=false page=false>
	<link rel="stylesheet" href="${base}/static/css/base.css">
	<link rel="stylesheet" href="${base}/static/css/menu.css">
	<link rel="stylesheet" href="${base}/static/css/workplan.css">
	  <!-- 新 Bootstrap 核心 CSS 文件 -->
	  <link rel="stylesheet" href="${base}/static/css/bootstrap.min.css">
	<#if datepicker>
	  <link rel="stylesheet" href="${base}/static/css/datepicker.css">
	</#if>
	<#if page>
	  <link rel="stylesheet" href="${base}/static/css/page.css">
	</#if>
</#macro>

<#macro plan_js datepicker=false form=false>
	<script src="${base}/static/js/common.js"></script>
 	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="${base}/static/js/jquery-1.11.2.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="${base}/static/js/bootstrap.min.js"></script>
	<#if form>
		<script src="${base}/static/js/jquery.form.js"></script>
	</#if>
	<#if datepicker>
		<script src="${base}/static/js/bootstrap-datepicker.js"></script>
	</#if>
</#macro>

<#macro page_js formid="">
	$('.k-click').click(function(){
	    if( $(this).hasClass('k-disabled'))
	      return;
	    var curpage = $(this).attr('curpage');
	    $('#curpage').val(curpage);
	    $('#${formid}').submit();
	  });
</#macro>



<#macro plan_select_progress progress="" name="" clazz="" all=false>
	<select <#if name?length gt 0>name="${name}"</#if> <#if clazz?length gt 0>class="${clazz}"</#if>>
		<#if all><option value="">所有</option></#if>
		<option value="1" <#if progress="1">selected</#if>>1%</option>
		<option value="25" <#if progress="25">selected</#if>>25%</option>
		<option value="50" <#if progress="50">selected</#if>>50%</option>
		<option value="75" <#if progress="75">selected</#if>>75%</option>
		<option value="90" <#if progress="90">selected</#if>>90%</option>
		<option value="100" <#if progress="100">selected</#if>>完成</option>
	</select>
</#macro>

<#macro plan_select_priority priority="" name="" clazz="" all=false>
	<select <#if name?length gt 0>name="${name}"</#if> <#if clazz?length gt 0>class="${clazz}"</#if>>
		<#if all><option value="">所有</option></#if>
		<option value="10" <#if priority="10">selected</#if>>轻度</option>
		<option value="30" <#if priority="30">selected</#if>>一般</option>
		<option value="50" <#if priority="50">selected</#if>>重要</option>
		<option value="70" <#if priority="70">selected</#if>>非常重要</option>
		<option value="100" <#if priority="100">selected</#if>>紧急</option>
	</select>
</#macro>

<#macro plan_span_priority priority>
	<#if priority="0"><span class="label label-default">默认</span></#if>
	<#if priority="10"><span class="label label-success">轻度</span></#if>
	<#if priority="30"><span class="label label-info">一般</span></#if>
	<#if priority="50"><span class="label label-primary">重要</span></#if>
	<#if priority="70"><span class="label label-warning">非常重要</span></#if>
	<#if priority="100"><span class="label label-danger">紧急</span></#if>
</#macro>


<#macro date_format date format="yyyy-MM-dd">
	${date?string("${format}")}
</#macro>

